#ifndef CIRCLE_PROPERTIES_H
#define CIRCLE_PROPERTIES_H

#include <iostream>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <fstream>
#include <sstream>
#include <spdlog/spdlog.h>


namespace Circle {
    class Properties {
    public:
        // 将默认构造函数声明为公共成员
        Properties();
        Properties(const std::string& filePath);
        ~Properties();

        bool add(const std::string& key, const std::string& value);
        bool remove(const std::string& key);
        bool set(const std::string& key, const std::string& value);
        std::string get(const std::string& key) const;
        static bool isValid(const std::string& filePath);
        bool SafetyValidation(const std::string& key, const std::string& str) const;
        bool setSecurityString(const std::string& securityStr);
        std::string getSecurityString() const;

        std::string securityString;

    private:
        std::unordered_map<std::string, std::string> propertiesMap;
        void loadFromFile(const std::string& filePath);
    };
} // namespace Circle

#endif // CIRCLE_PROPERTIES_H